#define _CRT_SECURE_NO_WARNINGS 1

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

void test_vector1()
{
	vector<int> v1;
	vector<int> v2(10, 0);
	vector<int> v3(v2.begin(), v2.end());
	
	string str("hello world");
	vector<int> v4(str.begin(), str.end());

	vector<int> v5(v4);
}

void test_vector2()
{
	vector<int> v1(10, 0);
	vector<int> v2(v1.begin(), v1.end());

	vector<int>::iterator an = v2.begin();
	while (an != v2.end())
	{
		cout << *an << " ";
		++an;
	}
	cout << endl;

	string str("hello world");
	vector<int> v3(str.begin(), str.end());
	vector<int>::iterator it = v3.begin();
	while (it != v3.end())
	{
		cout << *it << " ";
		++it;
	}
	cout << endl;
}

void test_vector3()
{
	vector<int> v1;
	v1.resize(20);

	for (size_t i = 0; i < 20; i++)
	{
		v1[i] = i;
	}

	string s1;
	s1.resize(10);

}

void test_vector4()
{
	vector<int> v1(5, 0);
	int i = 0;
	while (i < v1.size())
	{
		v1[i] = i;
	}
	auto it = find(v1.begin(), v1.end(), 3);
	if (it != v1.end())
	{
		v1.insert(it, 30);
	}
}


int main()
{
	vector<int> v;
	v.resize(5);

	string s;
	s.resize(4);
	return 0;
}